<!DOCTYPE html>
<!-- html -->
<html>
<!-- head -->

<head>
    <title>活动招募</title>
    <link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" /><!-- bootstrap-CSS -->
<link href="css/font-awesome.css" rel="stylesheet" type="text/css" media="all" /><!-- Fontawesome-CSS -->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script type='text/javascript' src='js/jquery-2.2.3.min.js'></script>
<script type='text/javascript' src='js/template.js'></script>
<!-- Custom Theme files -->
<link href="css/menu.css" rel="stylesheet" type="text/css" media="all" /> <!-- menu style --> 
<!--theme-style-->
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />  
<!--//theme-style-->
<link rel="stylesheet" type="text/css" href="css/easy-responsive-tabs.css " />
<!--meta data-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta name="keywords" content="" />
<script type="text/javascript">
    function isWeixnOpen(){

    var ua = navigator.userAgent.toLowerCase();

    if(ua.match(/MicroMessenger/i)=="micromessenger") {

        return true;

    } else {

        return false;

    }

}
 $(function(){
  if (isWeixnOpen()) {

  }
  else{
    // document.oncontextmenu=new Function("event.returnValue=false;");
    // document.onselectstart=new Function("event.returnValue=false;");
    // $("body").text("请在微信打开");
    // $("body").css("text-align","center");
  }
 })
</script>
    <script type="application/x-javascript">
    addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);

    function hideURLbar() { window.scrollTo(0, 1); }
    </script>
    <!--//meta data-->
    <!-- nav smooth scroll -->
    <script>
    $(document).ready(function() {
        $(".dropdown").hover(
            function() {
                $('.dropdown-menu', this).stop(true, true).slideDown("fast");
                $(this).toggleClass('open');
            },
            function() {
                $('.dropdown-menu', this).stop(true, true).slideUp("fast");
                $(this).toggleClass('open');
            }
        );
    });
    </script>
    <style type="text/css">
    body,html{
        height: 100%;
        background: #efefef;
    }
    .tabStyle{
        width: 100%;
        height: 50px;

    }
    .tabStyle li{
        float: left;
        width: 33%;
        line-height: 40px;
        text-align: center;
        list-style: none;
        border-bottom: 2px solid #ddd;
    }
     .tabStyle li:nth-of-type(1){

        border-bottom: 2px solid red;
     }
    </style>
    <!-- //nav smooth scroll -->
</head>
<!-- //head -->
<!-- body -->

<body>
   
     <div style="position: relative;">
      <img style="width: 100%;" src="./images/love2.png">
      <img style="position: absolute;width: 30%;top: 10px;left: 10px;"  src="./images/logo.png">
    </div>
   
    <div class="w3ls-list">
        <div class="container">
            <ul class="tabStyle">
                <li  value="large_ass">大型联谊</li>
                <li value="single_salon">单身沙龙</li>
                <li value="charit_acti">公益活动</li>
            </ul>
            
            <div class="col-md-3 w3ls-aside">
                <div class="view_profile" id="showList">
                  <!--  <h6>&nbsp;&nbsp;最新活动正在筹划中，敬请期待！</h6> -->
                    <script id="tpl" type="text/html">
                        <%:=newsListTpl({list: list1, newsTpl: newsTpl})%>
                    </script>
                    <script id="child-tpl" type="text/html">
                        <%list.forEach(function (news) {%>
                            <%:=newsTpl(news)%>
                                <%})%>
                    </script>
                    <script id="sub-child-tpl" type="text/html">
                        <ul class="profile_item">
                          <!--   <a href="./nhtml/nActivity0.html?id=<%=acti_no%>"> -->
                            <div onclick="turn('<%=acti_no%>')">
                                <li class="profile_item-img">
                                    <img src="<%=sharing_photo%>" class="img-responsive" alt="">
                                </li>
                                <li class="profile_item-desc">
                                    <h6><%=title%></h6>
                                    <p><%=brief_introduction%></p>
                                    <p><%=start_time%></p>
                                    <p><%=deadline_time%></p>
                                   
                                </li>
                                <div class="clearfix"> </div>
                            </div>    
                           <!--  </a> -->
                        </ul>
                    </script>
                    
                    <div class="clearfix"> </div>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
        
    </div>
    <script src="js/easyResponsiveTabs.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {

        $('#parentHorizontalTab').easyResponsiveTabs({
            type: 'default', //Types: default, vertical, accordion
            width: 'auto', //auto or any width like 600px
            fit: true, // 100% fit in a container
            closed: 'accordion', // Start closed if in accordion view
            tabidentify: 'hor_1', // The tab groups identifier
            activate: function(event) { // Callback function if tab is switched
                var $tab = $(this);
                var $info = $('#nested-tabInfo');
                var $name = $('span', $info);

                $name.text($tab.text());

                $info.show();
            }
        });

    });
    </script>
   
    <script src="js/jquery.menu-aim.js">
    </script>
    <script src="js/main.js"></script>
    <!-- Resource jQuery -->
    <!-- //menu js aim -->
    <!-- for bootstrap working -->
    <script src="js/bootstrap.js"></script>
    <!-- //for bootstrap working -->
    <script type="text/javascript">
    $(document).ready(function() {
        /*
            var defaults = {
                containerID: 'toTop', // fading element id
                containerHoverID: 'toTopHover', // fading element hover id
                scrollSpeed: 1200,
                easingType: 'linear' 
            };
            */

        $().UItoTop({ easingType: 'easeOutQuart' });

    });
    </script>
    <a href="#" id="toTop" style="display: block;"> <span id="toTopHover" style="opacity: 1;"> </span></a>
    <!-- for smooth scrolling -->
    <script type="text/javascript" src="js/move-top.js"></script>
    <script type="text/javascript" src="js/easing.js"></script>
    <script type="text/javascript">
    jQuery(document).ready(function($) {
        $(".scroll").click(function(event) {
            event.preventDefault();
            $('html,body').animate({ scrollTop: $(this.hash).offset().top }, 1000);
        });
    });
    </script>
    <script type="text/javascript">
    var tpl = template(document.getElementById('tpl').innerHTML);
    var childTpl = template(document.getElementById('child-tpl').innerHTML);
    var subChildTpl = template(document.getElementById('sub-child-tpl').innerHTML);
     var large_assArr=new Array();
     var single_salonArr=new Array();
     var charit_actiArr=new Array();
      $.ajax({
            method: "get",
          
            url: "/activity/getOldActivity",
            success: function(res) {
                for (var i = 0; i < res.data.length; i++) {
                   if (res.data[i].acti_type=="large_ass") {
                    res.data[i].start_time= res.data[i].start_time.split("T")[0];
                    res.data[i].deadline_time= res.data[i].deadline_time.split("T")[0];
                    large_assArr.push(res.data[i]);
                    showView(large_assArr);
                   }else if(res.data[i].acti_type=="single_salon") {
                      res.data[i].start_time= res.data[i].start_time.split("T")[0];
                    res.data[i].deadline_time= res.data[i].deadline_time.split("T")[0];
                    single_salonArr.push(res.data[i]);
                   }else if(res.data[i].acti_type=="charit_acti") {
                      res.data[i].start_time= res.data[i].start_time.split("T")[0];
                    res.data[i].deadline_time= res.data[i].deadline_time.split("T")[0];
                    charit_actiArr.push(res.data[i]);
                   }
                }
                //    window.location.href = './index_add.html'
            },
            error: function(error) {
                console.log(error)
            }
        })

   
    $(".tabStyle li").click(function(){
       
        if (this.getAttribute("value")=='large_ass') {
            console.log($(this))
            $(".tabStyle li").css("borderBottom","2px solid #ddd");
            $(this).css("borderBottom","2px solid red");
            showView(large_assArr);
         // $(this).css("borderBottom","1 solid gray")
          // showView(arr);
        }else if(this.getAttribute("value")=='single_salon'){
            $(".tabStyle li").css("borderBottom","2px solid #ddd");
            $(this).css("borderBottom","2px solid red");
            showView(single_salonArr);
        }
        else if(this.getAttribute("value")=='charit_acti'){
             $(".tabStyle li").css("borderBottom","2px solid #ddd");
            $(this).css("borderBottom","2px solid red");
            showView(charit_actiArr);
        }
    })
    function showView(arr){
     if (arr.length==0) {
        arr=[{
           title:"活动正在筹划中，敬请期待！" 
        }]
     }   
  
    var html = tpl({
        newsListTpl: childTpl,
        newsTpl: subChildTpl,
        list1: arr
    })
    document.getElementById('showList').innerHTML = html;
    }
    function turn(id){
      console.log(id)
      if (id) {
        window.location.href="./nhtml/nActivity1.html?id="+id;
      }
    }
    </script>
    <!-- //for smooth scrolling -->
</body>
<!-- //body -->

</html>
<!-- //html -->